package com.example.demo2;

import com.innover.activemq.config.ActiveMQConfig;
import com.innover.activemq.message.MessageModel;
import com.innover.activemq.producer.Producer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Demo2Application {

	public static void main(String[] args) {
		SpringApplication.run(Demo2Application.class, args);
		ActiveMQConfig.startMQConsumers();
		Producer producer = (Producer) ActiveMQConfig.getBean("producer");
		MessageModel messageModel = new MessageModel();
		messageModel.setMessageBody("1234567".getBytes());
		producer.sendMessage(messageModel);

		while (true){

		}
	}
}
